package com.tutu.commons.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

/**
 * @Program: b2c-cloud-store
 * @Description: 订单实体类
 * @Author: JK.TuTu
 * @ @Version: 1.0
 * @Create: 2022-12-27 17:06
 **/
@Data
@TableName("orders")
public class Order {
    @TableId(type = IdType.AUTO)
    private Integer id;   //主键id

    @TableField("order_id")
    private String orderId; //订单Id

    @TableField("user_id")
    private Integer userId;   //用户Id

    @TableField("product_id")
    private Integer productId;  //商品Id

    @TableField("product_num")
    private Integer productNum;  //订单中的商品数量

    @TableField("product_price")
    private Double productPrice; //订单商品总价格

    @TableField(value = "order_time", fill = FieldFill.INSERT_UPDATE)
    private Long orderTime; //订单生成时间

    @TableField(exist = false)  //该字符不在数据库表中
    private String productPicture;  //商品图片
}
